#pragma once

#include "Common.h"

#ifdef DX_11
#include <d3d11.h>
#include <d3dx10math.h>
#endif

namespace Graphics
{
	struct Color
	{
		Color()
		{
		}

		Color(const float color[4])
		{
			SetColor(color);
		}

#ifdef DX_11
		D3DXVECTOR4 XColor;
#endif
		float FColor[4];

		void SetColor(const float setColor[4])
		{
#ifdef DX_11
			float* non_const_color = const_cast<float*>(setColor);

			XColor.x = non_const_color[0];
			XColor.y = non_const_color[1];
			XColor.z = non_const_color[2];
			XColor.w = non_const_color[3];
#endif
			memcpy(FColor, setColor, sizeof(float) * 4);
		}
	};

	namespace Colors
	{
		static const float Black[4]				= { 0.0f, 0.0f, 0.0f, 1.0f };
		static const float Blue[4]				= { 0.0f, 0.0f, 1.0f, 1.0f };
		static const float CornflowerBlue[4]	= { 0.1f, 0.5f, 0.9f, 1.0f };
		static const float Green[4]				= { 0.0f, 1.0f, 0.0f, 1.0f };
		static const float Red[4]				= { 1.0f, 0.0f, 0.0f, 1.0f };
		static const float White[4]				= { 1.0f, 1.0f, 1.0f, 1.0f };
	}

	namespace XColors
	{
		static const Color White = Color(Colors::White);
	}
}